import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class TestPassword {
    public static void main(String[] args) {
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
        
        String dbHash = "$2a$10$8K1p/a0dhrxiowP.dnkgNORTWgdEDHn5L2/xjpEWuC.QQv4rKO9jO";
        
        String testPassword = "admin123";
        
        boolean matches = encoder.matches(testPassword, dbHash);
        
        System.out.println("Password match result: " + matches);
        System.out.println("Test password: " + testPassword);
        System.out.println("Database hash: " + dbHash);
        
        String newHash = encoder.encode(testPassword);
        System.out.println("New generated hash: " + newHash);
    }
}